/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.letmeshare.pedagogue.core.entities;

import java.util.Set;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import org.letmeshare.pedagogue.core.validation.ValidationException;

/**
 *
 * @author ibisuser1
 */
@Entity
public class Person extends Party{
    
    @OneToOne
    private PersonalData details;
    @ManyToOne
    private Address correspondenceAddress;
    @ManyToOne
    private Address permanentAddress;
    @OneToMany
    private Set<RoleInstance> roles;
    
    @Override
    public void validate() throws ValidationException {
        
    }

    public void setRoles (Set<RoleInstance> roles) {
        this.roles = roles;
    }
    
    public Set<RoleInstance> getRoles() {
        return roles;
    }
}
